package com.teemo.equipment.controller;

import com.teemo.equipment.biz.EquipmentBizService;
import com.teemo.equipment.domain.dto.EquipmentPageDTO;
import com.teemo.equipment.domain.vo.BasePageVO;
import com.teemo.equipment.domain.vo.EquipmentPageVO;
import com.teemo.equipment.domain.vo.ResultVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Teemo
 */
@RestController
@RequestMapping("/equipment")
@Tag(name = "装备管理",description = "装备管理前端控制器")
public class EquipmentController {

    @Resource
    private EquipmentBizService equipmentBizService;

    @GetMapping("/page")
    @Operation(summary = "装备分页查询")
    @ApiResponse(description = "装备分页查询")
    public ResultVO<BasePageVO<EquipmentPageVO>> page(@ParameterObject EquipmentPageDTO dto){
        BasePageVO<EquipmentPageVO> page=  equipmentBizService.page(dto);
        return ResultVO.success(page);
    }

}
